$(function () {
    let markId = getUrlString('markid');
    let id = getUrlString('id');
    function getDetail () {
        let data = {
            'markid':markId,
            'toyid':id
        };
        getData('post','/niu/apiv4/niu_catedetail.php',data,function (data) {
            console.log(data);
            $('.toyspic').attr('src',data.info.pics);
            $('.toysname').html(data.info.name);
            $('#maker').html(data.info.maker);
            $('#mainseries').html(data.info.mainseries);
            $('#typeName').html(data.info.typeName);
            $('#price').html(data.info.price);
            let book_time = data.info.book_time.substring(0,4)+'年'+data.info.book_time.substring(4,6)+'月';
            $('#book_time').html(book_time);
        })
    }
    getDetail();
    $('#jcBtn').click(function () {
        window.location.href = 'dancool://web=https://apitest.odancool.com/weixinapp/view/productData/compileData.html?id='+id
    })
});